{include file="public_iframe:head"}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="ibox-tools">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="{:url('Member/lst',['is_excls'=>'1'])}">
                            导出会员
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                        </div>
                        <form class="form-inline" action="" method="get">
                            <div class="col-sm-9">
                                <div class="input-group col-sm-3  pull-right">
                                    <input type="text" name="keyword" value="{$keyword?$keyword:'';}" placeholder="手机关键词" class="input-sm form-control">
                                    <span class="input-group-btn">
                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                    </span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>账号</th>
                                <th>企业</th>
                                <th>联系人</th>
                                <th>用户所在行业</th>
                                <th>用户所在地区</th>
                                <th>固定电话</th>
                                <th>qq</th>
                                <th>邮件</th>
                                <th>剩余金额</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="members" id="vo"}
                            <tr>
                                <td>{$vo.mobile}</td>
                                <td>{$vo.company}</td>
                                <td>{$vo.contact}</td>
                                <td>{$vo.user_industry}</td>
                                <td>{$vo.province}{$vo.city}{$vo.area}</td>
                                <td>{$vo.telephone}</td>
                                <td>{$vo.qq}</td>
                                <td>{$vo.email}</td>
                                <td>
                                    {$vo.amount}
                                </td>
                                <td>
                                    {if condition="$vo.status eq '1'"}允许登录{else /}禁止登录{/if}
                                </td>
                                <td>
                                    <a data-toggle="modal" class="btn btn-primary" href="__URL__/info?id={$vo.id}">修改账号</a>
                                    <a data-toggle="modal" class="btn btn-primary" href="__URL__/recharge?id={$vo.id}">充值</a>
                                    <a data-toggle="modal" class="btn btn-primary" href="{:url('Member/change_password',['id'=>$vo.id])}">修改密码</a>
                                    <a data-toggle="modal" class="btn btn-primary" href="__URL__/record?id={$vo.id}">充值记录</a>

                                    <a data-toggle="modal" class="btn btn-primary" href="javascript:void(0)" a_href="{:url('Member/member_edit',['id'=>$vo.id,'edit'=>'status'])}" onclick="submit(this)" status="{if condition='$vo.status eq 1'}0{else /}1{/if}">{if condition="$vo.status eq '1'"}停用{else /}启用{/if}</a>
                                    <a data-toggle="modal" class="btn btn-primary" href="javascript:void(0)" a_href="{:url('Member/member_edit',['id'=>$vo.id,'edit'=>'del'])}" status=""  onclick="submit(this)">删除</a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
                {$page}
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function submit(obj){
          var formData = new FormData();
          var status = $(obj).attr('status');
          var url = $(obj).attr('a_href');
        
          formData.append('status',status);

          $.ajax({
              url:url,
              type:'POST',
              data:formData,
              async:false,
              processData:false,
              contentType:false,
              success:function(result) {
                location.reload();
              }
          });
    }

</script>
</body>

</html>
